/*
 * @Author: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @Date: 2023-10-26 19:21:33
 * @LastEditors: 姚沈阳 11500793+yao-shenyang@user.noreply.gitee.com
 * @LastEditTime: 2023-11-03 18:38:56
 * @FilePath: \票务管理\app\ticketing-management\vue-project\src\router\index.ts
 * @Description: 
 * qq1908552310
 */
import { createRouter, createWebHistory } from 'vue-router'

const router: any = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/home/homepage",
    },
    {
      path: "/login",
      name: "登录",
      component: () =>
        import(/* webpackChunkName: "about" */ "../views/login/index.vue"),
    },
    {
      path: "/home",
      name: "主页",
      component: () =>
        import(/* webpackChunkName: "about" */ "../views/home/index.vue"),
      children: [
        {
          path: "/home/homepage",
          name: "首页",
          component: () =>
            import(
            /* webpackChunkName: "about" */ "../views/home/HomePage/index.vue"
            )
        },
        {
          path: "/home/trainnumber",
          name: "车次管理",
          component: () =>
            import(
            /* webpackChunkName: "about" */ "../views/home/TrainNumber/index.vue"
            ),
          children: [
            {
              path: "/home/trainnumber/addtrain",
              name: "新建车次",
              component: () => import('../views/home/TrainNumber/addTrainNumber/index.vue'),
            },
            {
              path: "/home/trainnumber/edittrain",
              name: "编辑车次",
              component: () => import('../views/home/TrainNumber/editTrainNumber/index.vue'),
            },
          ]
        },
        {
          path: "/home/station",
          name: "车站管理",
          component: () =>
            import(
            /* webpackChunkName: "about" */ "../views/home/Station/index.vue"
            )
        },
        {
          path: "/home/line",
          name: "线路管理",
          component: () =>
            import(
            /* webpackChunkName: "about" */ "../views/home/Line/index.vue"
            )
        },
        {
          path: "/home/ticket",
          name: "车票管理",
          component: () =>
            import(
            /* webpackChunkName: "about" */ "../views/home/Ticket/index.vue"
            )
        },
        {
          path: "/home/order",
          name: "订单管理",
          component: () =>
            import(
            /* webpackChunkName: "about" */ "../views/home/Order/index.vue"
            )
        },
        {
          path: "/home/control",
          name: "个人轨迹监控",
          component: () =>
            import(
            /* webpackChunkName: "about" */ "../views/home/Control/index.vue"
            )
        }
      ]
    },

  ]
})

export default router
